#include<stdio.h>
#include<unistd.h>

int main()
{
	char percent[102]={0};
	char buffer[5] = "-\\|/";
  int i=0;
	while (i <= 100)
	{
		printf("[%-100s][%d%%] %c\r", percent, i,buffer[i%4]);
		fflush(stdout);
		percent[i++] = '#';
		usleep(10000);
	}

  printf("\n");
   //fflush(stdout); 
	return 0;
}
